<template>
  <div>
    <upload-img class="tmp"
      :img="file"
      :upload="true"
      v-on:updateImg="update"
    >
    </upload-img>
  </div>
</template>
<script>
  import uploadImg from './upload-img'
  export default {
    name: 'test',
    data () {
      return {
        file: {
          name: 'idBackImg',
          url: 'http://wx.yunpuvip.com/data/upload/img/20171206/5a27689dda8b8.png'
          // url: ''
        }
      }
    },
    components: {
      uploadImg
    },
    methods: {
      update (url, img) {
        console.log('url', url)
        console.log('img', img)
      }
    }
  }  
</script>
<style lang="scss">
  .tmp {
    width: 60%
  }
</style>
